import 'package:cbec_app/pages/my/controller/safe_account_ctr.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../components/base/base_nav_bar.dart';
import '../../../components/base/base_page.dart';
import '../../../components/common/text_arrow_item.dart';
import '../../../routes/routes.dart';

///账户安全
class AccountSafe extends GetView<SafeAccountCtr> {
  const AccountSafe({super.key});

  @override
  Widget build(BuildContext context) {
    return GetBuilder<SafeAccountCtr>(builder: (controller) {
      return BasePage(
        title: "账户安全",
        iconType: IconType.back,
        children: [
          ListItem(
              texts: "登录密码修改",
              ontap: () {
                Get.toNamed(Routes.updatePassword, arguments: {'type': 0});
              }),
          controller.hasPassword
              ? ListItem(
                  texts: "支付密码修改",
                  ontap: () {
                    Get.toNamed(Routes.modifyPayPassword);
                  })
              : ListItem(
                  texts: "支付密码设置",
                  ontap: () {
                    Get.toNamed(Routes.settingPayPass);
                  }),
        ],
      );
    });
  }
}
